IF exists(SELECT * FROM dbo.sysobjects WHERE name='vakrapportOpdrachtCodesTrimmen' AND xtype='P') 
BEGIN
	DROP PROCEDURE vakrapportOpdrachtCodesTrimmen
END
GO

create procedure vakrapportOpdrachtCodesTrimmen
as
begin
update vakrapportOpdrachtCodes
set code = dbo.vakrapportTrim(code)
end